﻿@{
	string FlowID = Request.QueryString["flowid"];
	string StepID = Request.QueryString["stepid"];
	string GroupID = Request.QueryString["groupid"];
	string TaskID = Request.QueryString["taskid"];
	string InstanceID = Request.QueryString["instanceid"];
	string DisplayModel = Request.QueryString["display"] ?? "0";
	string DBConnID = "06075250-30dc-4d32-bf97-e922cb30fac8";
	string DBTable = "TempTest_Purchase";
	string DBTablePK = "ID";
	string DBTableTitle = "Title";
	if(InstanceID.IsNullOrEmpty()){InstanceID = Request.QueryString["instanceid1"];}
	YJ.Platform.Dictionary BDictionary = new YJ.Platform.Dictionary();
	YJ.Platform.WorkFlow BWorkFlow = new YJ.Platform.WorkFlow();
	YJ.Platform.WorkFlowTask BWorkFlowTask = new YJ.Platform.WorkFlowTask();
	string fieldStatus = BWorkFlow.GetFieldStatus(FlowID, StepID);
	LitJson.JsonData initData = BWorkFlow.GetFormData(DBConnID, DBTable, DBTablePK, InstanceID, fieldStatus, "{}");
	string TaskTitle = BWorkFlow.GetFromFieldData(initData, DBTable, DBTableTitle);
}
<link href="~/Scripts/FlowRun/Forms/flowform.css" rel="stylesheet" type="text/css" />
<script src="~/Scripts/FlowRun/Forms/common.js" type="text/javascript" ></script>
<input type="hidden" id="Form_ValidateAlertType" name="Form_ValidateAlertType" value="2" />
<input type="hidden" id="Form_TitleField" name="Form_TitleField" value="TempTest_Purchase.Title" />
<input type="hidden" id="Form_DBConnID" name="Form_DBConnID" value="06075250-30dc-4d32-bf97-e922cb30fac8" />
<input type="hidden" id="Form_DBTable" name="Form_DBTable" value="TempTest_Purchase" />
<input type="hidden" id="Form_DBTablePk" name="Form_DBTablePk" value="ID" />
<input type="hidden" id="Form_DBTableTitle" name="Form_DBTableTitle" value="Title" />
<input type="hidden" id="Form_AutoSaveData" name="Form_AutoSaveData" value="1" />
<textarea id="Form_DBTableTitleExpression" name="Form_DBTableTitleExpression" style="display:none;width:0;height:0;"></textarea>
<script type="text/javascript">
	var initData = @Html.Raw(BWorkFlow.GetFormDataJsonString(initData));
	var fieldStatus = "1"=="@Request.QueryString["isreadonly"]" ? {} : @Html.Raw(fieldStatus);
	var displayModel = '@DisplayModel';
	$(window).load(function (){
		formrun.initData(initData, "TempTest_Purchase", fieldStatus, displayModel);
	});
</script>
<p style="TEXT-ALIGN: center"><span style="FONT-SIZE: 20px"><strong>物资采购申请</strong></span><br/></p><table class="flowformtable" cellspacing="1" cellpadding="0" data-sort="sortDisabled" uetable="null" align="center" width="99%"><tbody><tr class="firstRow"><td style="WORD-BREAK: break-all" valign="top" width="102">申请人：<br/></td><td style="WORD-BREAK: break-all" valign="top" width="434"><input type="text" type1="flow_org" id="TempTest_Purchase.UserID" name="TempTest_Purchase.UserID" value="u_@YJ.Platform.Users.CurrentUserID.ToString()" more="0" isflow="1" class="mymember" title="" dept="0" station="0" user="0" workgroup="0" unit="0" rootid=""/></td><td style="WORD-BREAK: break-all" valign="top" width="97">部门：</td><td valign="top" width="439" style="word-break: break-all;"><input type="text" type1="flow_org" id="TempTest_Purchase.UserDept" name="TempTest_Purchase.UserDept" value="@(YJ.Platform.Users.CurrentDeptID)" more="0" isflow="1" class="mymember" title="" dept="0" station="0" user="0" workgroup="0" unit="0" rootid=""/></td></tr><tr><td style="WORD-BREAK: break-all" valign="top" width="102">申请日期：<br/></td><td style="WORD-BREAK: break-all" valign="top" width="434"><input type="text" type1="flow_datetime" id="TempTest_Purchase.SqDateTime" name="TempTest_Purchase.SqDateTime" value="@(YJ.Utility.DateTimeNew.ShortDate)" defaultvalue="@(YJ.Utility.DateTimeNew.ShortDate)" istime="0" daybefor="0" dayafter="1" currentmonth="0" isflow="1" class="mycalendar" title=""/></td><td style="WORD-BREAK: break-all" valign="top" width="97">备注：</td><td valign="top" width="439"><input type="text" id="TempTest_Purchase.Note" type1="flow_text" name="TempTest_Purchase.Note" value="" placeholder="qwerewqrwqer" align="left" style="width:90%;text-align:left;padding-right:3px;" valuetype="0" isflow="1" class="mytext" title=""/></td></tr><tr><td style="WORD-BREAK: break-all" valign="top" colspan="4">申请明细：</td></tr><tr><td valign="top" colspan="4"><table class="flowformsubtable" data-showindex="1" data-sortstring="name" style="width:99%;margin:0 auto;" cellpadding="0" cellspacing="1" issubflowtable="1" id="subtable_TempTest_PurchaseList_ID_ID_PurchaseID"><thead><tr><th style="text-align:center;width:50px;">序号</th><th style="text-align:left;width:10%;padding-right:3px;">名称<input type="hidden" name="flowsubtable_id" value="TempTest_PurchaseList_ID_ID_PurchaseID"/><input type="hidden" name="flowsubtable_TempTest_PurchaseList_ID_ID_PurchaseID_secondtable" value="TempTest_PurchaseList"/><input type="hidden" name="flowsubtable_TempTest_PurchaseList_ID_ID_PurchaseID_primarytablefiled" value="ID"/><input type="hidden" name="flowsubtable_TempTest_PurchaseList_ID_ID_PurchaseID_secondtableprimarykey" value="ID"/><input type="hidden" name="flowsubtable_TempTest_PurchaseList_ID_ID_PurchaseID_secondtablerelationfield" value="PurchaseID"/></th><th style="text-align:center;width:10%;padding-right:3px;">型号</th><th style="text-align:center;width:10%;padding-right:3px;">单位</th><th style="text-align:right;width:10%;padding-right:3px;">数量</th><th style="text-align:right;width:10%;padding-right:3px;">金额</th><th style="text-align:left;width:10%;padding-right:3px;">日期</th><th style="text-align:left;width:10%;padding-right:3px;">类型</th><th style="text-align:left;width:10%;padding-right:3px;">备注</th><th></th></tr></thead><tbody><tr type1="listtr"><td style="text-align:center;"><label name="showindex">1</label></td><td colname="TempTest_PurchaseList_Name" iscount="0" style="text-align:left;padding-right:3px;"><input type="hidden" name="hidden_guid_TempTest_PurchaseList_ID_ID_PurchaseID" value="f9df51a92bd15b0f9edcbfd8366bdf88"/><input type="hidden" name="flowsubid" value="TempTest_PurchaseList_ID_ID_PurchaseID"/><input type="text" class="mytext" issubflow="1" type1="subflow_text" name="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Name" id="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Name" colname="TempTest_PurchaseList_Name" value="" valuetype="0"/><script type="text/javascript"></script></td><td colname="TempTest_PurchaseList_Model" iscount="0" style="text-align:center;padding-right:3px;"><textarea class="mytextarea" name="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Model" id="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Model" issubflow="1" type1="subflow_textarea" colname="TempTest_PurchaseList_Model"></textarea><script type="text/javascript"></script></td><td colname="TempTest_PurchaseList_Unit" iscount="0" style="text-align:center;padding-right:3px;"><select class="myselect" name="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Unit" id="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Unit" issubflow="1" type1="subflow_select" colname="TempTest_PurchaseList_Unit">@Html.Raw(BDictionary.GetOptionsByID("e7f836be-f091-460f-86e1-f0b6cdceba39".ToGuid(), YJ.Platform.Dictionary.OptionValueField.ID, "", false))</select><script type="text/javascript"></script></td><td colname="TempTest_PurchaseList_Quantity" iscount="1" style="text-align:right;padding-right:3px;"><input type="text" class="mytext" issubflow="1" type1="subflow_text" name="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Quantity" id="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Quantity" colname="TempTest_PurchaseList_Quantity" style="width:100px" value="" iscount="1" onblur="formrun.subtableCount('TempTest_PurchaseList_ID_ID_PurchaseID','TempTest_PurchaseList_Quantity','countspan_TempTest_PurchaseList_ID_ID_PurchaseID_TempTest_PurchaseList_Quantity');" valuetype="1" onchange="onchange_77163ec49bb9e2adc88d14c979f4991e(this);"/><script type="text/javascript">function onchange_77163ec49bb9e2adc88d14c979f4991e(srcObj){$("[id$='Sum1']",$(srcObj).parent().parent()).val(parseFloat( $(srcObj).val())*5)}</script></td><td colname="TempTest_PurchaseList_Sum1" iscount="1" style="text-align:right;padding-right:3px;"><input type="text" class="mytext" issubflow="1" type1="subflow_text" name="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Sum1" id="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Sum1" colname="TempTest_PurchaseList_Sum1" style="width:100px" value="" iscount="1" onblur="formrun.subtableCount('TempTest_PurchaseList_ID_ID_PurchaseID','TempTest_PurchaseList_Sum1','countspan_TempTest_PurchaseList_ID_ID_PurchaseID_TempTest_PurchaseList_Sum1');" valuetype="2"/></td><td colname="TempTest_PurchaseList_Date" iscount="0" style="text-align:left;padding-right:3px;"><input type="text" class="mycalendar" name="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Date" id="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Date" issubflow="1" type1="subflow_datetime" value="@(YJ.Utility.DateTimeNew.ShortDate)" colname="TempTest_PurchaseList_Date"/><script type="text/javascript"></script></td><td colname="TempTest_PurchaseList_Type" iscount="0" style="text-align:left;padding-right:3px;"><select class="myselect" name="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Type" id="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Type" issubflow="1" type1="subflow_select" colname="TempTest_PurchaseList_Type"><option value="办公用品">办公用品</option><option value="设备">设备</option></select></td><td colname="TempTest_PurchaseList_Note" iscount="0" style="text-align:left;padding-right:3px;"><input type="text" class="mymember" name="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Note" id="TempTest_PurchaseList_ID_ID_PurchaseID_f9df51a92bd15b0f9edcbfd8366bdf88_TempTest_PurchaseList_Note" issubflow="1" type1="subflow_org" value="u_@YJ.Platform.Users.CurrentUserID.ToString()" colname="TempTest_PurchaseList_Note" dept="0" station="0" user="1" workgroup="0" unit="0" style="width:80px" more="0"/></td><td><input type="button" class="mybutton" style="margin-right:4px;" value="增加" onclick="formrun.subtableNewRow(this);"/><input type="button" class="mybutton" value="删除" onclick="formrun.subtableDeleteRow(this);"/></td></tr><tr type1="counttr"><td colspan="11" align="right" style="padding-right:20px; text-align:right;"><span style="margin-right:10px;">数量合计：<label id="countspan_TempTest_PurchaseList_ID_ID_PurchaseID_TempTest_PurchaseList_Quantity">0</label></span><span style="margin-right:10px;">金额合计：<label id="countspan_TempTest_PurchaseList_ID_ID_PurchaseID_TempTest_PurchaseList_Sum1">0</label></span></td></tr></tbody></table></td></tr></tbody></table><p><br/></p>
